import request from '@/utils/request'

// 查询;列表
export function listCar(query) {
  return request({
    url: '/fincal/car/list',
    method: 'get',
    params: query
  })
}

// 查询;详细
export function getCar(id) {
  return request({
    url: '/fincal/car/' + id,
    method: 'get'
  })
}
// 判断驾驶员是否已经匹配车辆;
export function isLicensePlateRegistered(data) {
  return request({
    url: '/fincal/car/isLicensePlateRegistered',
    method: 'post',
    data: data
  })
}

// 新增;
export function addCar(data) {
  return request({
    url: '/fincal/car',
    method: 'post',
    data: data
  })
}

// 修改;
export function updateCar(data) {
  return request({
    url: '/fincal/car',
    method: 'put',
    data: data
  })
}

// 删除;
export function delCar(id) {
  return request({
    url: '/fincal/car/' + id,
    method: 'delete'
  })
}
